package com.hhck.controller;

import com.hhck.entity.Result;
import com.hhck.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/statistics")
public class StatisticsController {

    @Autowired
    private ProductService productService;

    /**
     * 统计数据（查询每个仓库的商品数量）
     */
    @GetMapping("/store-invent")
    public Result storeInvent() {
        return Result.ok(productService.queryEveryStoreProductCount());
    }

}

